<template>
  <div>
    <div>演示meta里面的内容</div>
    <!-- 复用 meta 实现一个类似面包屑 -->
    <ul>
      <li
        v-for="item in $route.matched"
        :key="item.path"
        @click="$router.push(item.path)"
      >
        {{ item.meta.title }}
      </li>
    </ul>
    <router-view></router-view>
  </div>
</template>

<script>
export default {
  created() {
    console.log(this.$route);
  },
};
</script>
